//
//  YPHttpRequestMethod.h
//  AFGetText
//
//  Created by KiVen on 15/11/5.
//  Copyright © 2015年 张文权. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface YPHttpRequestMethod : NSObject

+(void)sendAsyRequestURL:(NSString *)url withData:(NSDictionary *)requestDictionary withCompletionBlock:(void (^)(NSDictionary *responseDictionary))aCompletionBlock withFailedBlock:(void (^)(NSError *error))aFailedBlock withIndicator:(BOOL)flag atView:(UIView *)view;


+(void )uploadImage:(UIImage *)image
                            parameters:(NSDictionary *)parameters
                                   url:(NSString *)url
                               success:(void(^)(NSDictionary *responseDictionary))success
                               failure:(void(^)(NSError *error))failure
                  uploadProgressBlock :(void(^) (NSInteger bytesWritten,long long totalBytesWritten, long long totalBytesExpectedToWrite))block atView:(UIView *)view;

+(void)updateRequestURL:(NSString *)url withData:(NSDictionary *)requestDictionary withCompletionBlock:(void (^)(NSDictionary *responseDictionary))aCompletionBlock withFailedBlock:(void (^)(NSError *error))aFailedBlock withIndicator:(BOOL)flag atView:(UIView *)view;
@end
